package com.example.qxfw.common.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.ny.StationInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/************************************
 *
 * @author : HuangDeYin Jolly
 * @since : JDK 11
 * @Date : 2023/7/5  星期三   16:40
 * @description : 此类用来
 ***************************************/
@Mapper
public interface StationInfoMapperXml extends BaseMapper<StationInfo> {
    /**
     * delete by primary key
     *
     * @param stationid primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String stationid);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(StationInfo record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(StationInfo record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(StationInfo record);

    List<StationInfo> selectOrderByStationId();

    List<StationInfo> querySelect(@Param("stationInfo") StationInfo stationInfo, @Param("order") String order, @Param("limit") Integer limit);

    List<StationInfo> queryByMainCrop(@Param("mainCrop") String mainCrop);

    List<StationInfo> queryAgriculturalServiceInformationStation(@Param("stationId") String stationId, @Param("stationName") String stationName, @Param("county") String county);

    List<String> queryStationId();
    List<String> queryStationName();
    List<String> queryStationCounty();

    List<String> selectSmallScaleStationJoin(@Param("stationId") String stationId);

    @Delete("truncate table station_info")
    void clearStationInfo();
}